forum

home / developersection / forums / executenonquery: connection property has not been initialized.

ExecuteNonQuery: Connection property has not been initialized.

Tarun Kumar 1916 23-Feb-2016
I am getting error "ExecuteNonQuery: Connection property has not been initialized." while executing command in C#.

SqlCommand cmd = new SqlCommand();
                cmd.CommandText = "My Insert Query";
                cmd.ExecuteNonQuery();

Please help


c# c#  .net  sql server  sql 
Updated on 23-Feb-2016
Tarun Kumar

Other


Message
Can you answer this question?

Answer

1 Answers

Liked By